package com.hepinghospital.user.ui.activity.eyecheck;

import android.os.Bundle;
import android.widget.ImageView;
import android.widget.TextView;

import com.hepinghospital.user.R;
import com.hepinghospital.user.base.BaseActivity;
import com.rest.response.BaseJsonResponse;
import com.rest.response.HomeDeptResponse;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * Created by Administrator on 2018/6/11.
 */

public class EyeBookResultActivity extends BaseActivity {
    List<HomeDeptResponse> listHelp = new ArrayList<>();
    @BindView(R.id.tv_title)
    TextView tvTitle;
    @BindView(R.id.btn_back)
    ImageView btnBack;
    @BindView(R.id.btn_add_family)
    TextView btnAddFamily;
    @BindView(R.id.img_status)
    ImageView imgStatus;
    @BindView(R.id.tv_eye_order_num)
    TextView tvEyeOrderNum;
    @BindView(R.id.tv_patient_name)
    TextView tvPatientName;
    @BindView(R.id.tv_eye_left)
    TextView tvEyeLeft;
    @BindView(R.id.tv_eye_hospital_name)
    TextView tvEyeHospitalName;
    @BindView(R.id.tv_look_time)
    TextView tvLookTime;
    @BindView(R.id.tv_submit)
    TextView tvSubmit;
    @BindView(R.id.tv_eye_checkList)
    TextView tvEyeCheckList;
    String patientId;


    @Override
    protected void initViews() {
        tvTitle.setText( "预约结果" );
    }

    @Override
    protected void initData() {
        BaseJsonResponse createCheck = (BaseJsonResponse) getIntent().getSerializableExtra( "createCheck" );
        if (createCheck != null) {
            tvEyeHospitalName.setText( createCheck.hosName );
            tvPatientName.setText( createCheck.patientName );
            tvEyeLeft.setText( createCheck.checkSeries );
            tvEyeCheckList.setText( createCheck.checkList );
            tvLookTime.setText( createCheck.checkDate );
            patientId = createCheck.patientId;
        }

    }


    @Override
    protected int getLayoutResource() {
        return R.layout.activity_eye_book_result;
    }

    @OnClick(R.id.tv_submit)
    public void onViewClicked() {
        Bundle bundle = new Bundle();
        bundle.putString( "patientId", patientId );
        startActivity( EyeBookListActivity.class, bundle );
    }
}
